.class final Lorg/microemu/device/impl/ui/CommandManager$1;
.super Ljava/lang/Object;
.source "CommandManager.java"

# interfaces
.implements Ljavax/microedition/lcdui/CommandListener;


# instance fields
.field private final this$0:Lorg/microemu/device/impl/ui/CommandManager;


# direct methods
.method constructor <init>(Lorg/microemu/device/impl/ui/CommandManager;)V
    .locals 0
    .parameter

    .prologue
    .line 54
    iput-object p1, p0, Lorg/microemu/device/impl/ui/CommandManager$1;->this$0:Lorg/microemu/device/impl/ui/CommandManager;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable;)V
    .locals 3
    .parameter "c"
    .parameter "d"

    .prologue
    .line 57
    iget-object v0, p0, Lorg/microemu/device/impl/ui/CommandManager$1;->this$0:Lorg/microemu/device/impl/ui/CommandManager;

    invoke-static {v0}, Lorg/microemu/device/impl/ui/CommandManager;->access$000(Lorg/microemu/device/impl/ui/CommandManager;)Ljavax/microedition/lcdui/List;

    move-result-object v0

    if-nez v0, :cond_0

    .line 58
    iget-object v0, p0, Lorg/microemu/device/impl/ui/CommandManager$1;->this$0:Lorg/microemu/device/impl/ui/CommandManager;

    invoke-static {v0}, Lorg/microemu/device/impl/ui/CommandManager;->access$100(Lorg/microemu/device/impl/ui/CommandManager;)V

    .line 61
    :cond_0
    invoke-static {}, Lorg/microemu/MIDletBridge;->getMIDletAccess()Lorg/microemu/MIDletAccess;

    move-result-object v0

    invoke-virtual {v0}, Lorg/microemu/MIDletAccess;->getDisplayAccess()Lorg/microemu/DisplayAccess;

    move-result-object v0

    iget-object v1, p0, Lorg/microemu/device/impl/ui/CommandManager$1;->this$0:Lorg/microemu/device/impl/ui/CommandManager;

    invoke-static {v1}, Lorg/microemu/device/impl/ui/CommandManager;->access$200(Lorg/microemu/device/impl/ui/CommandManager;)Ljavax/microedition/lcdui/Displayable;

    move-result-object v1

    invoke-interface {v0, v1}, Lorg/microemu/DisplayAccess;->setCurrent(Ljavax/microedition/lcdui/Displayable;)V

    .line 63
    invoke-static {}, Lorg/microemu/device/impl/ui/CommandManager;->access$300()Ljavax/microedition/lcdui/Command;

    move-result-object v0

    if-eq p1, v0, :cond_1

    sget-object v0, Ljavax/microedition/lcdui/List;->SELECT_COMMAND:Ljavax/microedition/lcdui/Command;

    if-ne p1, v0, :cond_2

    .line 64
    :cond_1
    invoke-static {}, Lorg/microemu/MIDletBridge;->getMIDletAccess()Lorg/microemu/MIDletAccess;

    move-result-object v0

    invoke-virtual {v0}, Lorg/microemu/MIDletAccess;->getDisplayAccess()Lorg/microemu/DisplayAccess;

    move-result-object v1

    iget-object v0, p0, Lorg/microemu/device/impl/ui/CommandManager$1;->this$0:Lorg/microemu/device/impl/ui/CommandManager;

    invoke-static {v0}, Lorg/microemu/device/impl/ui/CommandManager;->access$400(Lorg/microemu/device/impl/ui/CommandManager;)Ljava/util/Vector;

    move-result-object v0

    iget-object v2, p0, Lorg/microemu/device/impl/ui/CommandManager$1;->this$0:Lorg/microemu/device/impl/ui/CommandManager;

    invoke-static {v2}, Lorg/microemu/device/impl/ui/CommandManager;->access$000(Lorg/microemu/device/impl/ui/CommandManager;)Ljavax/microedition/lcdui/List;

    move-result-object v2

    invoke-virtual {v2}, Ljavax/microedition/lcdui/List;->getSelectedIndex()I

    move-result v2

    invoke-virtual {v0, v2}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljavax/microedition/lcdui/Command;

    iget-object v2, p0, Lorg/microemu/device/impl/ui/CommandManager$1;->this$0:Lorg/microemu/device/impl/ui/CommandManager;

    invoke-static {v2}, Lorg/microemu/device/impl/ui/CommandManager;->access$200(Lorg/microemu/device/impl/ui/CommandManager;)Ljavax/microedition/lcdui/Displayable;

    move-result-object v2

    invoke-interface {v1, v0, v2}, Lorg/microemu/DisplayAccess;->commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable;)V

    .line 68
    :cond_2
    return-void
.end method
